using System;
using System.Collections;
using System.Collections.Specialized;
using System.Text.RegularExpressions;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using Dimok.Aspx.Manager.Lib;
using Dimok;
using Dimok.Exceptions;
using Data;


namespace Dimok.Aspx.Manager.Application {
	public partial class Application_Image : Page_AL {
		#region Controls declaration
		#endregion

		protected void Page_Load(object sender, System.EventArgs e){
			try {
				SQL.SELECT(selDealers,db,SQL.Dealers_V,"Name","ID");
				SQL.SELECT(selSalesPersons,uox.DealerSalesPersons(),"Name","ID");

				ltrAddresses.Text = uox.GetAddresses();
				xmlApplInfo.InnerHtml = uox.ApplInfo.GetXml();
				ltrApplicantCo.Text = SQL.XmlInnerText(uox.db,"SELECT * FROM v_Borrower_1 WHERE "+uox.ApplicantFilter());

				ltrEmployments.Text = uox.GetEmployments(0);
				ltrEmploymentsCo.Text = uox.GetEmployments(1);

				SQL.BindSelect(selHouseHolds,SQL.ExecuteDatasetEx(uox.db,"SELECT * FROM ts_HouseHoldType"),"Name","ID");
				DataSet dsOtherIncome = SQL.ExecuteDatasetEx(uox.db,SQL.NonEmploymentIncomeSQL);
				SQL.BindSelect(selUsableIncomes,dsOtherIncome,"t","v");
				SQL.BindSelect(selUsableIncomesCo,dsOtherIncome,"t","v");

				ltrWorkFlow_F.Text = uox.MenusNext;
				ltrWorkFlow_B.Text = uox.MenusPrev;

			}catch(Exception exc){ throw new ClientException(exc);}
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e) {
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent() {    
		}
		#endregion
	}
}